An earphone fit deviation analysis algorithm

This study provides an accurate method for evaluating the fit of earphones, which could be used for establishing a linkage between interference/gap values with human perception. Seven commercial CAD software tools stood out and were explored for the analysis of the deviation between earphone and ear. However, the current deviation analysis method remains to be improved for earphone fit evaluation due to excessive points in the calculation (Geomagic Wrap and Siemens NX), lack of value on interference (Geomagic Control X), computation boundary required (Rapidform XOR/Redesign), repetitive computation with same points and inclined calculation line segment or even invalid calculation (Solidworks, Creo). Therefore, an accurate deviation analysis algorithm was promoted, which calculated the deviation between earphone and ear exactly and classified the interference set and gap set precisely. There are five main procedures of this algorithm, which are point cloud model pre-processing, the generation of distance vectors, the discrimination of interference set and gap set, the discrimination of validity, and statistical analysis and visualization. Furthermore, the usability and validity of the deviation analysis algorithm were verified through statistical analysis and comparing visual effects based on the earphone-wearing experiment. It is certified that the deviation analysis algorithm is appropriate for earphone fit evaluation and the eight indexes of this algorithm were proved to be related to subjective comfort scores. It is meaningful for ear-worn product fit analysis, design, and development phases.

There is a large market of ear-related products including earmuffs, earplugs, earphones, and hearing aids 1 . The global earphone and headphone market size was valued at USD 34.8 billion in 2020 and is expected to grow at a compound annual growth rate of 20.3% from 2020 to 2027. The ergonomics design and accommodation research of ear-related products is under development. It points out that there is still a conflict between anthropometry and current product dimensions, and the relationship between 3D ear anthropometry and product design has not been sufficiently studied to provide a comprehensive generalization of its application in ergonomic design 2 . Even so, the product design based on those 3D shape characteristics of the human body has resulted in gaining a better fit and increased comfort, satisfaction, safety, and usability 3 .
Ears consist of cartilage covered with skin and arranged in a pattern of various elevations and depressions 4 . The shape of the external acoustic meatus is not a straight canal but passes upward from the external opening. The external ear consists of the auricle and the external acoustic meatus. The auricle collects sound waves and conducts them along the external acoustic meatus inwards towards the eardrum, the tympanic membrane. The component of the auricle includes skin, cartilaginous framework, ligaments, auricular muscles, and bone. In addition, the external acoustic meatus extends from the concha to the tympanic membrane; it is approximately 2.5 cm from the floor of the concha and approximately 4 cm from the tragus. It has two structurally different parts: its lateral third is cartilaginous, and its medial two-thirds is osseous 4 . The biological structure of the ear is so complex that it is difficult to provide a comprehensive application of 3D ear anthropometry in the ergonomic design of earphones 2 . Thus, the relationship between ear anthropometric data and related product design is still required a comprehensive exploration 2 . For improving the user experience of ear-related products, physical fit and comfort perception both need to be taken into consideration. Algorithms are used as specifications for performing calculations and data processing and there are several algorithms that are related to computer vision [5][6][7][8] . However, there is no such tool/algorithm that could assist in exploring the earphone fit accurately, which impede the fit design of earphone based on the ear anatomy.
In general, proper fit is typically defined as a small and uniform distance between the shape of the body and products 9 . Generally, three methods, including design for collective fit, design for fit within clusters, and design for an individual fit, are viable in improving the fit of products based on 1D/2D anthropometric data or 3D models 10 . The first strategy is designed for collective fit, or design for average. It mainly links 1D anthropometrical data to product characteristics. In the research of Lee et al. 11 , the earphone-head was designed to refer to the average of concha measurements. The second strategy is to design for fit within clusters. www.nature.com/scientificreports/ of measurements is an effective method to associate body shapes with different types of products [12][13][14] , including principal component analysis 15 , clustering analysis [16][17][18][19] , and so on. These methods were used for generating the sizing system of products [15][16][17][18][19][20][21][22] . The third strategy is to design for individual fit. It is widely used for the design of hearing-aid equipment 23 and customized earphones. Customized earphones, such as UE custom in-ear monitors and QDC in-ear earphones, were conducted to fit the unique shape of ears to provide incredible comfort and noise cancellation. Apparently, it is better to connect accurate 3D models of human shapes with the entire product surface geometry for assessing proper fit. However, it is illustrated that 3D models were cumbersome to work with for product designers as they are shown in an unmeasurable and highly dimensional abstract space 10 . For presenting advanced information in shape, virtual fit analysis and finite element analysis were frequently used. In virtual fit analysis, the gap means that there is a deviation between the two models. And the inference means that there is an overlap between the two models. In the research of Ellena 9 , virtual fit analysis method was used for investigating and comparing the fitting accuracy of helmets. The standoff distances (SOD) and Gap Uniformity (GU) between the head and helmets were recorded and the helmets fit index was established. For the earphone design, an ear-tip was designed based on a virtual fit analysis of an earphone with 3D ears 11 . The fit of an oxygen mask is assessed by the virtual fit analysis method 20,24 . In this research, Euclidean distances between the mask and facial surface were calculated and design details of shape were adjusted 25 . In addition, finite element analysis (FEA) was used for indicating the distribution of pressure and displacements. In the research of Lee 3 , template registration and FEA were used for predicting the contact pressure between the face and the product. Thus, virtual fit analysis method is a more appropriate way to estimate the fit of wearable products instead of FEA.

Related work
For virtual fit analysis done previously, the deviation analysis tool in CATIA V5R21™ (Dassault Systemes, Velizy, FR) was frequently applied 9,11 in ergonomics design. Also, it is widely applied in product design optimisation 26 , additive manufacturing (AM) artifacts, and accuracy comparison 27 .
In industry, deviation analysis is a routine form of troubleshooting performed at process manufacturing facilities. When speed is imperative, a robust deviation detection system, along with a good process for analyzing the resulting data, is essential for solving problems quickly. In dataPARC, the four deviation detection methods were frequently used, including absolute change (the simplest form of deviation detection. Comparing a value against the average), variability (how much the data varies or how to spread out the data is relative to the average), standard deviation (a standard for control charts. Measures how much the data varies over time), multiparameter (advanced deviation detection metric showing the difference between expected values and real data, to evaluate the overall health of the process. The ranges are often rate-dependent). And in Creo Parametric 8.0, Two types of deviation analysis can be performed, including distance to the surface and geometric. In distance to surfaces mode, it calculates the distance from points in the scan set best-fit surfaces to the corresponding reference surfaces in the design model. And in Geometric mode, it calculates the size (where applicable) of the scan set best-fit surfaces and also the location and orientation of those surfaces relative to their reference surfaces in the design mode. Moreover, the deviation analysis method of CATIA is defined as a diagnostic tool that can calculate the angle between faces. A single edge or a series of edges could be selected. The modality of the edge is diverse, which can be between faces on a surface or any edges on a solid. In addition, the projection direction of the deviation analysis method of CATIA could be defined, by picking a plane or a line.
According to the Desk research on the deviation analysis method, seven commercial CAD software tools were approved to operate the deviation analysis functions perfectly. They are Geomagic Wrap 2017™ (3D Systems, Rock, Hill, SC,US), Geomagic Control X 2020™ (3D Systems, Rock, Hill, SC,US), Siemens NX 12 (Siemens, Gernamy), Rapidform XOR/Redesign (INUS technology, Korea), Solidworks 2019 (Dassault systems, Paris), and Creo Parametric 8.0(PTC, Las Vegas). In the very first attempt, worm-wheel gearing was imported into these commercial CAD software tools. It turns out that deviation analysis can be conducted in all of them ( Fig. 1).
In a manufacturing scenario, deviation analysis is a vital method for reverse engineering, which is used for verifying the deviation between the scanned or modeling models with the reference surfaces. However, only some ergonomic research used the deviation analysis for virtual fit analysis (Table 1). In the research of Meunier 28 , the laser scanner and software 'shapeanalysis' were developed to calculate standoff distance, and it proved to be an excellent tool for the assessment of helmet fit. Wonsup lee 24,29 identified the fit as the infiltration distance between the oxygen mask CAD and 3D face image. When the infiltration distance is more than 10 mm, it means excessive pressure and deep infiltration. And when the infiltration distance is less than 0 mm, it means oxygen leakage. Thierry Ellena 9 used the Gap Uniformity (GU) and Standoff Distance (SOD) as the independent variables of helmet fit index (HFI), and it provides a fit score from 0 (excessively poor fit) to 100 (perfect fit) was compared with subjective fit assessments of surveyed cyclists, and results showed that HFI was related with participants' feelings when comparing three commercially available bicycle helmets. Wonsup lee 11 only mentioned that the ear-tip design could be conducted based on a virtual fit analysis method. However, the detailed evaluating procedures and results were not shown in the papers. According to the listed research, the gap/interference distance could be regarded as an indicator of fit and comfort. In some research, the gape/interference distance was calculated by commercial software with deviation analysis function. Others measured the distance between the wearable product and the human body through CAD software manually. However, none of the previous research mentioned that the appropriate commercial software for earphone fit analysis.

Pilot study
For evaluating the fit between earphones and ears, the deviation analysis functions should be tried as the first attempt. As the proper fit is typically defined as a small and uniform distance between the shape of products and the human body, the variables which can represent the amount and uniformity should be contained in the fit analysis. In addition, the indexes of deviation analysis represent the spatial distance between the two models. Only specific points of the two models should be engaged in fit analysis instead of all points of both models. Therefore, commercial software with deviation analysis functions was applied for evaluating the fit of the earphone at first. For comparison, the same earphone (with only the body portion) and ear (with only the concha part) models were imported into the seven software tools. It found out that deviation analysis between ear and earphones can be conducted on five of them, which are CATIA, Geomagic Wrap, Geomagic Control X, Siemens NX, and Rapidform XOR/Redesign, whereas all of them perform poorly. There are four main incorrect calculation situations for deviation analysis in earphone fit evaluation (Fig. 2).
For CATIA, the 'deviation analysis' function was selected and set in 'only orthogonal' mode. Six values of deviation analysis appeared. However, there are some mistakes, which are induced by repetitive computation with the same points ( Fig. 2a) and inaccurate computation results triggered by exaggerated angles between ear and earphone meshes (Fig. 2b). For Geomagic Wrap, every point of the ear was calculated. However, some of them do not represent the spatial relationship between two meshes. Therefore, excessive points were calculated (Fig. 2c). This incorrect situation is also shown in Siemens NX. In addition, only the maximum gap and maximum interference were shown in the 'deviation measurement' method in Siemens NX. Moreover, for Geomagic Control X, only the maximum distance of positive value was counted which is apparently a lack of value of interference. Besides, ' Allowable Deviation' should be set before doing 'Mesh Deviation' in Rapidform XOR/Redesign (Fig. 2d), while this index is not clear between ear mesh and earphone mesh. In addition, gap and interference cannot be calculated in Solidworks and Creo as both ear mesh and earphone mesh are not assembly parts, and there is not a clear assembly relationship between them. The comparison of functions and values between seven     Table 2. Moreover, calculation of visual effects between ear mesh and earphone mesh on five commercial CAD software tools were shown in Fig. 3. All in all, the effect of the deviation analysis tool in CATIA is better than others among existing deviation analysis methods in all commercial CAD software. The deviation analysis tool in CATIA is not an excellent method for quantifying the virtual fit between the earphone (with only the body portion) and the ear (with only the concha part). Hence, this research aims to promote a more accurate deviation analysis algorithm for investigating the relationship between physical fit and comfort perception of earphones in this research. It is committed to stating the physical fit between ear and earphones precisely and providing physical guidance for holistic, user-centered design for ear-worn products.

Deviation analysis algorithm for earphone fit analysis
In this program, the ear model is regarded as a reference model and the earphone model is regarded as a target model. Both ear and earphone models are processed as triangular mesh models in STL format. In this algorithm, the gap means that there is a deviation between the two models. And the inference means that there is an overlap between the two models. Thus, the gap set which consists of segments means that there is a gap between the two models, and the interference set which consists of segments means that there is an interference between two models. Briefly, the computational logic of the deviation analysis algorithm is shown in The assemble of the reference model is: The assemble of the target model is:  www.nature.com/scientificreports/ perpendicular to the triangular facet BF j . t is the total number of vectors. The V 1 q is defined as the distance vector and the absolute value of V 1 q is S q . The segment which represents S q is called the calculated segment: The discrimination of interference set and gap set. In order to discriminate the validity of distance vectors, the gap set is defined as G 1 , G 2 , and the interference set is defined as I 1 , I 2 .
When the angle between V 2 p and BV j is more than 90°, When the angle between V 2 p and BV j is less than 90°, The number of V 1 q is m , and the angle between V 1 q and EV h is θ n (n = 1 . . . m). The discrimination of validity. When all criteria listed below are satisfied, the overall gap set ( G ) is the G 1 plus the G 2 . And the overall interference set ( I ) is the I 1 plus the I 2 . The criteria are: When EF h ∈ V 1 q , BP i ∈ V 1 q , EP g ∈ EF h ∈ I 2 , BP i ∈ I 1 , S q is saved. 2. Card S q EPM = 1 3. S q = BV j , is the constant 4. the angle between S q and EPM is more than 40° 5. BP i / ∈ B c Statistical analysis and visualization. Based on the S q of the gap set ( G ) and interference set ( I ), the mean value, maximum value and standard deviation (SD) of G and I , as well as the mean value, maximum value and SD of the whole set are calculated. All in all, there are eight statistical indexes, including the mean/max/ standard deviation value of the gap set, the mean/max/standard deviation value of the interference set, and the mean/standard deviation value of all. For visualization, the segments of the interference set are shown in red and yellow, which appears that red represents a bigger gap and yellow represents a smaller gap. And the segments of the gap set are shown in blue and green, which indicates that blue represents a bigger interference and green represents a smaller interference. All programs were written in Node.js. Visually, each color line segment represents one distance value. The calculation visual effect between the earphone (with only the body portion) and ear (with only the concha and external auditory canal part) of the deviation analysis algorithm is illustrated in Fig. 5.

Usability and validity verification of the deviation analysis algorithm
As mentioned in the pilot study, there is no industry or field standard of deviation analysis algorithm used for product fit analysis. In previous research, the deviation analysis functions of all commercial software were used for providing a tool for the product fit assessment. Hence, this algorithm should be verified to be used in fit assessment for earphone fit analysis. www.nature.com/scientificreports/ To verify the usability and validity of the deviation analysis algorithm, an experiment on AirPods 2 (Apple Inc., California, length = 40.5 mm, width = 16.5 mm) was carried out. Previously, comfort perception for earrelated products was achieved through questionnaires 30 or by reviewing online consumer content 31 . Thus, in this research, the Modified Borg scale was used for getting the comfort perception on AirPods 2. The deviation analysis algorithm was used for revealing the physical fit.
Participants. 34  This study was approved by the ethical review committee in the School of Design at Hunan University and conducted in Hunan University in accordance with the approval including all guidelines and regulations. All participants gave written and informed consent.

Evaluation index.
Eight regions of the ear, including concha, anthelix, antitragus, crux of helix, notch above tragus, tragus, incisura intertragica and external auditory canal, were partitioned 32 , which is shown in Fig. 6. The regions are defined by anatomical landmarks and curvature of the ear according to ear anatomy 4,33 . Participants were asked to evaluate eight regions separately.
The measured variables in Borg CR-10 questionnaire 34,35 were coded into quantitative data for analysis. Generally, there are four variables, including discomfort (0 = no discomfort, 10 = extremely strong (almost max)  www.nature.com/scientificreports/ discomfort), sense of pressure (0 = no sense of pressure, 10 = extremely strong (almost max) sense of pressure), sense of stability (0 = no sense of instability, 10 = extremely strong (almost max) sense of instability), sense of volume (0 = no sense of volume, 10 = extremely strong (almost max) sense of volume) and the sense of pressure on eight regions of ear. Sense of pressure means the regional or holistic pressure sensation caused by earphones and sense of stability means that the earphone has a relatively stable relative position with the ear. In addition, the sense of volume represents the swelling and foreign body sensation caused by earphones.  15 . The participants were asked to experience premeditated scenarios such as learning, working or entertainment, walking, running, and using the elliptical machine. It aims to imitate the actual scenarios when wearing an earphone. Similar tasks were assigned in previous studies [36][37][38] . The whole evaluating process is shown in Fig. 7.

Experiment process.
Data processing. There are five main steps in data processing (Fig. 8), including ear model meshing, ear model alignment, auricle partition, ear and earphone meshes alignment, and deviation analysis. Deviation analysis Before doing deviation analysis, the tube part of AirPods 2 was removed. The aligned body part of earphone meshes, overall ear meshes, and separate eight regions of ear mesh was imported into the deviation analysis algorithm. The mean value, maximum value, and standard deviation of gap sets and interference sets, as well as the mean and standard deviation of distances between ear and earphone, were calculated. The deviation analysis tool was used and the mean value, maximum value, of gap sets and interference sets, as well   Table 3. And spearman correlation analysis was conducted to understand the correlation between the values of the deviation analysis algorithm and the subjective discomfort score, shown in Table 4. It is shown that the mean value of all is statistically negatively correlated with comfort (r = −0.412, p < 0.05), which implies that comfortable experience is reported to be great when absolute values of gap and interference are small. Therefore, consistent morphological features between ears and earphones should be promoted. Besides, the maximum value of the gap is negatively correlated with comfort (r = −0.404, p < 0.05), which means that more interspace between ear and earphones brings evident discomfort feeling for people. In addition, the standard deviation of the gap is positively correlated with the overall sense of stability (r = −0.482, p < 0.01), which could be explained by the smaller morphological difference between ear and earphones, more stable earphones wear.
The mean value of all eight different regions of ear meshes (including concha, anthelix, antitragus, notch above tragus, tragus, incisura intertragica, external auditory canal) was shown in Table 5. It is shown that the maximum value (5.685) of the mean value was shown in anthelix, which indicates that there is a huge gap between the earphone and the anthelix of the ear. Besides, it is also shown that the minimum value (-0.566) of the mean value was shown in the tragus, which indicates that there is an interference between the earphone and the tragus of the ear.
Spearman correlation analysis was conducted to understand the correlation between the values of the deviation analysis algorithm and subjective discomfort score for separate regions of the ear, shown in Table 6. For concha, crux of helix, and incisura intertragica of ear, comfort is negatively correlated with the mean value of concha (−0.378, p < 0.05) and incisura intertragica (−0.553, p < 0.05). The sense of volume is negatively correlated with the mean value of incisura intertragica (−0.609, p < 0.01). And the sense of stability is positively correlated with the mean value of crux of helix (0.402, p < 0.05). Besides, the overall sense of pressure is negatively correlated with the mean value of incisura intertragica (−0.603, p < 0.01).
Hence, the results in this study showed that the quantitative (deviation analysis value) and qualitative (participants' comfort scores) data were related when comparing AirPods 2. This finding could demonstrate that the deviation analysis algorithm could be used for evaluating the fit of the earphone with the ear. in addition, the visual effect of deviation analysis between ear and earphone by using the deviation analysis algorithm is shown in Fig. 9.

Discussion
In previous ergonomic design research, virtual fit and deviation analysis was frequently used for assessing product fit. In the research of Lee 11 , the comfort and fit of ear product design were predicted by analyzing the overlapping areas between ear-related products and ears by using the virtual fit method. In addition, In addition, the deviation analysis function in CATIA was used for analyzing the fit condition between the helmet and head 9 . However, seven different commercial software were used for doing the virtual fit and deviation analysis between earphone and ear. It turns out none of the existing deviation analysis functions of commercial software are appropriate for earphone fit analysis. Four common computational errors were summarized, which are shown in Fig. 2. Therefore, this research attempts to build a new deviation analysis algorithm that reflects the physical fit between ear and earphone more precisely. This algorithm could set the objects (ear model and earphone model) flexibly and effectively, discriminate the precise points and meshes that should be calculated, distinguish the interference and gap set, and provide eight indexes for evaluating earphone fit. And the anatomic characteristics of the external ear were taken into consideration in this algorithm. Therefore, this deviation analysis algorithm is the most optimal choice for earphone fit evaluation.
To verify the usability and validity of the deviation analysis algorithm, an experiment on AirPods 2 was conducted. In this experiment, the subjective comfort scores were rated by 34 participants. And the value of indexes of the deviation analysis algorithm was calculated. The correlation analysis between values of the deviation analysis algorithm and subjective comfort scores was conducted. And it found that there are statistically correlations between values of the deviation analysis algorithm and subjective discomfort score for both overall ear meshes and separate regions of the ear. When the absolute values of gap and interference are small and the maximum value of gap is comparatively small, the comfort scores are reported to be great. The SD of the gap in overall ear meshes and the mean value of crux of helix could be the indicators of the sense of stability. And the sense of pressure and volume could be implied by the mean value of incisura intertragica. As a whole, the www.nature.com/scientificreports/ deviation analysis algorithm can analyze the earphone fit objectively and the results calculated by this algorithm are statistically related to the participants' feelings.
In the pilot study, the CATIA proved to be the best for earphone fit analysis statistically and visually. Therefore, the same well-aligned earphone and ear models were imported into the CATIA and deviation analysis algorithm for fit analysis. Overall ear mesh and eight regions of the external ear were calculated separately. Visually, the calculating effect of the deviation analysis algorithm is much better than that of CATIA.
Firstly, the surfaces of both ear and earphone meshes are continuous. The deviation analysis results of adjacent point clouds of ear and earphone meshes should be close to each other. In the analysis results on the concha by deviation analysis tool in CATIA, it appears that some red lines are far away from other line segments, which is shown in Fig. 10 (right). This obvious error is revised in the deviation analysis algorithm, which is shown in Fig. 10 (left).
Secondly, the points and triangle face of both ear and earphone meshes are separated into a set of gaps and a set of interferences in the deviation analysis algorithm. When both endpoints of the segment belong to the same set, the distance of this segment will be reserved for this set. On the contrary, in the CATIA, points and triangle faces are not classified. The surfaces of the ear sometimes were calculated with two surfaces of earphones when the surface of the ear embed into the earphone (Fig. 11 left). This mistake is amended in the deviation analysis algorithm (Fig. 11 right).
Furthermore, in both the deviation analysis algorithm and deviation analysis tool in CATIA, the angle between the line segment and ear meshes is 90°. The angle between the line segment and earphone meshes is set greater than 40° in the deviation analysis algorithm (Fig. 12 right). However, the angle between the line segment and earphone meshes has not been limited which could be any angle. Thus, some line segments are almost parallel with the surface of earphones in CATIA, which shows a much longer distance than it should be ( Fig. 12 left). Generally speaking, the value of deviation analysis results between earphone and ear is better in the deviation analysis algorithm than in the deviation analysis tool in CATIA visually.
Certainly, the fit of the earphone could be improved according to the deviation analysis results. For the helmet, a Helmet Fit Index (HFI) was proposed, which is a novel method to investigate and compare the fitting accuracy of helmets based on deviation analysis between the helmet and the 3D model of head 9 . For revising mask boundaries, a new virtual fit approach was put forward, which defines horizontal distances between mask boundary and 3D face surfaces. It can assist in adjusting the oxygen mask boundary shape 39 . To improve the ergonomic design of earphones, the deviation analysis algorithm could predict subjective assessment of earphone fit partly. Through experience, statistical variables were calculated and correlated with perceived comfort ratings. For example, the overall comfort was negatively correlated with the maximum value of gap, which indicates that a smaller shape shows better comfort assessment. Besides, overall comfort was negatively correlated with the mean value of all as well, which implies that earphone fit well with ear shape revealing better comfort assessment. For different regions of ear, the mean value of concha is negatively correlated with overall comfort, which shows that the fitness of concha is vital for improving earphones. Consequently, the deviation analysis calculated by the deviation analysis algorithm between ear and earphones could be a great indicator for ergonomic design on earphones in improving comfort experience.
Besides, correlations between overall subjective discomfort evaluation and the deviation analysis variables are weak because similar subjective reviews on AirPods 2 are reported while diverse deviation analysis values are calculated. Generally, the complex biological structure of the ear (including fat, cartilage, skeleton), the character of earphone (material, weight, center of gravity of earphones, and shape of earphones), and user behavior 36 should be considered as significant factors in affecting the comfort of wearing a wireless earphone. In this experiment, only the character of the earphone is considered which possibly resulted in a weakly significant result. Furthermore, the deviation analysis algorithm could be optimized and iterated with more data on earphones and ear meshes applied in the future. In the research of Yilmaz et al. 40 , the direction of deviated distance and form of distance were listed, which is set as shortest, along X, along Y, or along Z and set as the distance between a point and a triangle may consist of a point-to-plane, point-to-edge or point-to-vertex distance separately. In this research, the direction of deviation distance is set as the shortest distance between the points of earphones to the triangle faces of the ear. This deviation analysis algorithm could be improved based on more ear and earphones www.nature.com/scientificreports/ meshes virtual fit results and relative subjective discomfort score. More direction of deviation distance and the form of distance in deviation analysis could be studied in further research.

Conclusion
This study promoted an accurate deviation analysis algorithm for the physical fit analysis of the earphone. There are five main procedures in this algorithm and it can work out eight indexes that represent the fit between earphone and ear. An experiment on AirPods 2 was conducted and it is shown that the values of the deviation analysis algorithm are statistically correlated with perceived comfort scores. Visually, this algorithm shows a better calculating effect than that of CATIA and the deviation analysis functions of other commercial software. The deviation analysis algorithm is certified to be the best choice for earphone fit analysis. Certainly, the earphone fit design could be improved with the help of this algorithm. And it is significant for ear-worn product design and development phases in the future. Table 5. The descriptive statistics on the deviation analysis result of deviation analysis algorithm. **Correlation is significant at the 0.01 level. *Correlation is significant at the 0.05 level. Algorithm = Deviation analysis algorithm.